define(function(require, exports, module) {
    var ALL = require("../../common/all"),
        CONFIG = ALL.CONFIG,
        METHOD = ALL.METHOD,
        Init = ALL.Init;


    var _vm = Init.initVue({
        data : {
            list : [],
            name : '',
            type : '',
            status : '',
            cur : 1,
            all : 0,
            search : false
        },
        methods: {
            reSearch : function() {
                this.search = true;
                this.getData(1);
            },
            reset : function() {
                this.status = '';
                this.type = '';
                this.name = '';
            },
            getData : function(n) {
                var obj = { page: n, num: 10 };
                if (_vm.search) {
                    obj.status = _vm.status;
                    obj.type = _vm.type;
                    obj.name = _vm.name;
                }
                METHOD.loading.show();
                METHOD.ajax("collection/list_notissued",obj).done(function(json){
                    METHOD.loading.hide();
                    _vm.list = json.data;
                    _vm.all = json.page.pages;
                }).fail(function(){
                    METHOD.loading.hide();
                });
            },
            pass : function(id) {

            },
            refuse : function(id) {

            }
        }
    });

    _vm.getData(1);
});

